﻿using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace unTroublemaker.Tests
{
    [TestClass]
    public class AppArgumentsTest
    {
        [TestMethod, TestCategory("UnitTest")]
        public void GivenNoArgumentsIsInvalid()
        {
            Assert.IsTrue(new AppArguments(null).NotSpecified);
            Assert.IsTrue(new AppArguments(new string[]{}).NotSpecified);
        }

        [TestMethod, TestCategory("UnitTest")]
        public void GivenAnArgumentIsSpecified()
        {
            Assert.IsFalse(new AppArguments(new[]{"arg"}).NotSpecified);
        }

        [TestMethod, TestCategory("UnitTest")]
        public void GivenSeveralArgumentsTakesFirst()
        {
            var arguments = new AppArguments(new[]{"input1", "input2"});
            Assert.AreEqual("input1", arguments.File);
        }
    }
}
